package com.chinasofti.polymorphic.demo01;

public class Fu {
    int num = 10;
    public void method(){
        System.out.println("Fu类method");
    }
}
class Zi extends  Fu{
    int num = 20;
    public void method(){
        System.out.println("Zi类method");
    }
}
class Test01{
    public static void main(String[] args) {
        Fu fu = new Zi();
        System.out.println(fu.num);
        fu.method();
    }
}
